package com.gcq.javawork.service;

import com.gcq.javawork.model.domain.ShoppingCart;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author guochuqu
* @description 针对表【shopping_cart(购物车表)】的数据库操作Service
* @createDate 2024-10-16 16:40:05
*/
public interface ShoppingCartService extends IService<ShoppingCart> {

    /**
     * 根据用户id获取购物车
     * @param userId
     * @return
     */
    List<ShoppingCart> getShoppingCartByUserId(Long userId);

    /**
     * 添加购物车
     * @param shoppingCart
     */
    void addGoodsTOCart(ShoppingCart shoppingCart);


    /**
     * 删除购物车中的商品
     * @param shoppingCart
     */
    void deleteGoodsFromCart(ShoppingCart shoppingCart);


}
